<?php


namespace app\admin\business;


use app\common\model\Admin;
use app\common\model\ConsignorItem;
use app\common\model\MemberInfo;

class indexBus
{
    public function getTenderCountBus($where){
        $consignorModel = new ConsignorItem();
        $res = $consignorModel->getCountByWhere($where);
        $where['status'] = 1;
        $result = $consignorModel->getCountByWhere($where);
        $resultData = [
            'count'=> $res,
            'uncheckCount' => $result
        ];
        return $resultData;
    }
    public function getMemberInfoCountBus($where){
        $memberInfoModel = new MemberInfo();

        $res = $memberInfoModel->getCountByWhere($where);
        $where['status'] = 0;
        $result = $memberInfoModel->getCountByWhere($where);
        $resultData = [
            'count'=> $res,
            'uncheckCount' => $result
        ];
        return $resultData;
    }
    public function getAdminByWhereBus($id){
        $adminModel = new Admin();
        $res = $adminModel->getDetailById($id);
        return $res;
    }
}